﻿namespace NTLib.Core.Manipulators
{
    using NTLib.Core.Args;
    using System;
    using System.Threading;

    /// <summary>
    /// Interface that describe the behavior used to sealed an instance.
    /// </summary>
    public interface ISealed : IDisposable
    {
        #region Property

        /// <summary>
        /// Gets a value indicating whether this instance is sealed.
        /// </summary>
        /// <value>
        ///   <c>true</c> if this instance is sealed; otherwise, <c>false</c>.
        /// </value>
        bool IsSealed { get; }

        #endregion

        #region Event

        /// <summary>
        /// Occurs when the sealed status changed.
        /// </summary>
        event EventHandler<ValueChangedEventArgs<bool>> SealedChanged;

        #endregion

        #region Methods

        /// <summary>
        /// Sealeds this instance.
        /// </summary>
        void Sealed(CancellationToken token = default(CancellationToken));

        #endregion
    }
}
